#pragma once
#include <float.h>


#define ReleaseCOM(x)	{ if(x) { x->Release(); x=0;}}

class App;
extern App * g_app;


#define HR(x)                                      \
	{                                              \
	HRESULT hr = x;                                \
	if(FAILED(hr))                                 \
		{                                          \
		DXTRACE_ERR(#x, hr);                       \
		}                                          \
	}

const float INFINITY = FLT_MAX;
const float EPSILON = 0.001f;